<template>
  <div>
<!--  <div>-->
<!--    <el-select v-model="way" style="width:150px;margin-left: 10px;" @change="animeDat">-->
<!--      <el-option v-for="item in ways" :key="item.value" :label="item.label" :value="item.value">-->
<!--      </el-option>-->
<!--    </el-select>&nbsp;&nbsp;&nbsp;-->
<!--    <el-date-picker-->
<!--      style="width: 160px;margin-left: 10px;"-->
<!--      v-model="info.stockDate"-->
<!--      align="right"-->
<!--      type="datetime"-->
<!--      format="yyyy-MM-dd"-->
<!--      value-format="yyyy-MM-dd"-->
<!--      placeholder="选择开始时间"-->
<!--      @change="timeDate"-->
<!--    >-->
<!--    </el-date-picker> &nbsp;&nbsp;&nbsp;-->
<!--  </div>-->
  <el-row>
    <el-col :span="6" class="cards">
      <div class="box">
        <div class="box_num">
          <div class="box_color">领奖金额</div>
          <div class="text_color" v-if="!isNaN(sum)">
            <span>{{sum ? sum : 0 }}</span>元
          </div>
          <div class="text_color" v-if="isNaN(sum)"><span>0</span>元</div>
        </div>
      </div>
    </el-col>
    <el-col :span="6" class="cards">
      <div class="box">
        <div class="box_num">
          <div class="box_color">待转账的人数</div>
          <div class="text_color">
            <span>{{cashNum ? cashNum : 0}}</span>人
          </div>
        </div>
      </div>
    </el-col>
    <el-col :span="6" class="cards">
      <div class="box">
        <div class="box_num">
          <div class="box_color">领奖人数</div>
          <div class="text_color">
            <span>{{num ? num : 0}}</span>人
          </div>
        </div>
      </div>
    </el-col>

  </el-row>
  </div>
</template>

<script>
  export default {
    name: 'CollectStatistics',
    data () {
      return {
        cashNum: 0,
        num: 0,
        sum: 0
      }
    },
    methods:{
      dataSelect () {
        this.$http({
          url: this.$http.adornUrl2('/userMoney/awardStatistical'),
          method: 'get',
          params: this.$http.adornParams({
            // 'time': this.info.stockDate,
          })
        }).then(({data}) => {
          let returnData = data.data
          this.cashNum = returnData.cashNum
          this.num = returnData.num
          this.sum = returnData.sum
        })
      },
    },
    mounted () {
      this.dataSelect()
    }
  }
</script>

<style lang="scss" scoped>
  .box {
    height: 110px;
    padding: 24px;
    border: 1px solid #eee;
    margin: 15px 10px;
  }

  .box_num {
    font-size: 14px;
    color: #66b1ff;
  }

  .box_num .box_color {
    color: #333;
    font-size: 14px;
    margin-bottom: 15px;
  }

  .box_num div span {
    font-size: 20px;
    margin-left: 5px;
  }

  .text_color {
    color: #4f9dec;
  }

  .text_color span {
    margin-right: 5px;
  }
</style>
